//
//  NYTeacherSectionView.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2018/1/7.
//  Copyright © 2018年 niuwaketang. All rights reserved.
//

#import "NYTeacherSectionView.h"

@interface NYTeacherSectionView ()

@property (nonatomic, strong) UILabel *nameLabel;
@end

@implementation NYTeacherSectionView

- (instancetype)initWithReuseIdentifier:(nullable NSString *)reuseIdentifier {
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self initUI];
    }
    return self;
}
- (void)initUI {
    
    self.contentView.backgroundColor = UIColorMakeWithHex(@"#F3F4F5");
    [self.contentView addSubview:self.nameLabel];
    
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.right.bottom.top.equalTo(self.contentView);
        make.left.mas_equalTo(15);
    }];
}

- (void)setTitle:(NSString *)title {
    _title  = title;
    self.nameLabel.text = title;
}

- (UILabel *)nameLabel {
    if (!_nameLabel) {
        _nameLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        _nameLabel.textColor = UIColorMakeWithHex(@"#666666");
        _nameLabel.font = UIFontMake(13);
    }
    return _nameLabel;
}

@end
